//
//  ViewController.m
//  IOS 开发
//
//  Created by blue on 15-11-2.
//  Copyright (c) 2015年 tangchao. All rights reserved.
//

#import "ViewController.h"
#import "chaoniController.h"
@interface ViewController ()
//{
//    UILabel * l;
//}
@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
   self.title=@"我的标题栏";
    
    self.view.backgroundColor=[UIColor whiteColor];
    UILabel * l =[[UILabel alloc]initWithFrame:CGRectMake(100, 200, 100, 80)];
    l= [UILabel new];
    l.text=@"黄日 狗死";
    [l sizeToFit];
    l.center=CGPointMake(self.view.frame.size.width/2.0,self.view.frame.size.height/2.0);
    l.textColor=[UIColor blackColor];
    [self.view addSubview:l];
    
    
    
    UIButton *bou=[UIButton buttonWithType:UIButtonTypeRoundedRect];
    bou.frame=CGRectMake(100,100,200,44);
    [bou setTitle:@"点击" forState:UIControlStateNormal];
    [bou setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
    [bou addTarget:self action:@selector(onClick:)forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:bou];
    
}


-(void)onClick:(id)sender{
    chaoniController * con =[chaoniController new];
   [self .navigationController pushViewController:con animated:YES];
}



- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
